Nose tool#14
Open
SageCode98 wants to merge 10 commits intoVDBWRAIR:masterfrom
Open
Conversation
Author
averagehat
requested changes
Oct 25, 2019
…nto nose_tool This merge is needed due to recomemnded code changes # Please enter a commit message to explain why this merge is necessary,
averagehat
requested changes
Nov 4, 2019
| #Having difficulty instantiating attributes for match_primer for actual and expected | ||
| actual = match_primers( primer= [MappingCoordinate(10, 40)], alts= [Alt(24, 'G')], bamReads=[BamRead( 234, 5, 9, 154, 'ACGACGGCGCACACGGCAGCAGCAGCGACGCGGGGTTTATATATGGCACGAGCGCGCAGCGACGCAGCGCGCTTGAGACGAGGGTAGAGAGTGCGACGCCGCGCAGGAGAGGGGAGAGG') | ||
| expected = match_primers( primer= [MappingCoordinate(10, 40)], alts= [Alt(24, 'G')], bamReads=[BamRead( 234, 5, 9, 154, 'ACGACGGCGCACACGGCAGCAGCAGCGACGCGGGGTTTATATATGGCACGAGCGCGCAGCGACGCAGCGCGCTTGAGACGAGGGTAGAGAGTGCGACGCCGCGCAGGAGAGGGGAGAGG') | ||
| eq_(3, 5, "Actual {0} is not Expected {1}".format(actual, expected)) |
Collaborator
There was a problem hiding this comment.
You need to compare the actual and expected here
| other: List[Tuple[str, int]] # e.g. N, insertion, etc | ||
|
|
||
|
|
||
| def match_primers(primers: List[MappingCoordinate], alts: List[Alt], bamReads: Iterator[BamRead]) -> List[PrimerCount]: |
Collaborator
There was a problem hiding this comment.
You need to delete this function or give it an empty body, i.e.
def foo():
pass|
|
||
|
|
||
| #def test_primer_annotate(Alt: [str, int], consensus: , MappingCoordinate:[int, int], BamRead[int, int, int, int, str,str] PrimerCount) -> None: | ||
| def match_primers(primers= [MappingCoordinate(int,int)], alts= [Alt(int,str], bamReads=[BamRead(int, int,int, int, str)] -> PrimerCount: List[PrimerCount(int,int,int,int,int,int,int,int)]: |
Collaborator
There was a problem hiding this comment.
this function should be called test_match_primers and accept no arguments
| ok_(True, "True is true") | ||
| #Having difficulty instantiating attributes for match_primer for actual and expected | ||
| actual = match_primers( primer= [MappingCoordinate(10, 40)], alts= [Alt(24, 'G')], bamReads=[BamRead( 234, 5, 9, 154, 'ACGACGGCGCACACGGCAGCAGCAGCGACGCGGGGTTTATATATGGCACGAGCGCGCAGCGACGCAGCGCGCTTGAGACGAGGGTAGAGAGTGCGACGCCGCGCAGGAGAGGGGAGAGG') | ||
| expected = match_primers( primer= [MappingCoordinate(10, 40)], alts= [Alt(24, 'G')], bamReads=[BamRead( 234, 5, 9, 154, 'ACGACGGCGCACACGGCAGCAGCAGCGACGCGGGGTTTATATATGGCACGAGCGCGCAGCGACGCAGCGCGCTTGAGACGAGGGTAGAGAGTGCGACGCCGCGCAGGAGAGGGGAGAGG') |
Collaborator
There was a problem hiding this comment.
expected and actual seem to be the same. actual should be the result of a call to the function we are testing. expected should be defined separately, in this case, it would be a PrimerCount object. See https://realpython.com/python-testing/#how-to-structure-a-simple-test
averagehat
reviewed
Dec 13, 2019
| querySequence='ACGACGGCGCACACGGCAGCAGCAGCGACGCGGGGTTTATATATGGCACGAGCGCGCAGCGACGCAGCGCGCTTGAGACGAGGGTAGAGAGTGCGACGCCGCGCAGGAGAGGGGAGAGG') ] | ||
| result = match_primers(primers=coordinates, alts=alts, bamReads=mapperReadsOverlappingPosition, thresh=20) | ||
| expected = PrimerCount(24, 'G', altTotal=1, alt_Primers_overlap=1, altPrimersWithinEnd=1, primer_base='A') | ||
| # TODO FIX SO IT FAILS again |
Collaborator
There was a problem hiding this comment.
need to check that the result fits the expected
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
nose_tool test code for primer matching (beta)